<%@ page import="website.Reservation" %>



<div class="fieldcontain ${hasErrors(bean: reservationInstance, field: 'name', 'error')} ">
	<label for="name">
		<g:message code="reservation.name.label" default="Name" />
		
	</label>
	<g:textField name="name" maxlength="20" value="${reservationInstance?.name}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: reservationInstance, field: 'surname', 'error')} ">
	<label for="surname">
		<g:message code="reservation.surname.label" default="Surname" />
		
	</label>
	<g:textField name="surname" maxlength="20" value="${reservationInstance?.surname}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: reservationInstance, field: 'mail', 'error')} ">
	<label for="mail">
		<g:message code="reservation.mail.label" default="Mail" />
		
	</label>
	<g:field type="email" name="mail" value="${reservationInstance?.mail}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: reservationInstance, field: 'currency', 'error')} ">
	<label for="currency">
		<g:message code="reservation.currency.label" default="Currency" />
		
	</label>
	<g:select name="currency" from="${reservationInstance.constraints.currency.inList}" value="${reservationInstance?.currency}" valueMessagePrefix="reservation.currency" noSelection="['': '']"/>
</div>

<div class="fieldcontain ${hasErrors(bean: reservationInstance, field: 'phone', 'error')} ">
	<label for="phone">
		<g:message code="reservation.phone.label" default="Phone" />
		
	</label>
	<g:textField name="phone" pattern="${reservationInstance.constraints.phone.matches}" value="${reservationInstance?.phone}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: reservationInstance, field: 'apartment', 'error')} required">
	<label for="apartment">
		<g:message code="reservation.apartment.label" default="Apartment" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="apartment" name="apartment.id" from="${website.Apartment.list()}" optionKey="id" required="" value="${reservationInstance?.apartment?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: reservationInstance, field: 'arr_date', 'error')} required">
	<label for="arr_date">
		<g:message code="reservation.arr_date.label" default="Arrdate" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="arr_date" precision="day"  value="${reservationInstance?.arr_date}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: reservationInstance, field: 'country', 'error')} ">
	<label for="country">
		<g:message code="reservation.country.label" default="Country" />
		
	</label>
	<g:textField name="country" value="${reservationInstance?.country}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: reservationInstance, field: 'created', 'error')} required">
	<label for="created">
		<g:message code="reservation.created.label" default="Created" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="created" precision="day"  value="${reservationInstance?.created}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: reservationInstance, field: 'ctb', 'error')} ">
	<label for="ctb">
		<g:message code="reservation.ctb.label" default="Ctb" />
		
	</label>
	<g:checkBox name="ctb" value="${reservationInstance?.ctb}" />
</div>

<div class="fieldcontain ${hasErrors(bean: reservationInstance, field: 'dep_date', 'error')} required">
	<label for="dep_date">
		<g:message code="reservation.dep_date.label" default="Depdate" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="dep_date" precision="day"  value="${reservationInstance?.dep_date}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: reservationInstance, field: 'info', 'error')} ">
	<label for="info">
		<g:message code="reservation.info.label" default="Info" />
		
	</label>
	<g:textField name="info" value="${reservationInstance?.info}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: reservationInstance, field: 'late_arr', 'error')} ">
	<label for="late_arr">
		<g:message code="reservation.late_arr.label" default="Latearr" />
		
	</label>
	<g:checkBox name="late_arr" value="${reservationInstance?.late_arr}" />
</div>

<div class="fieldcontain ${hasErrors(bean: reservationInstance, field: 'num_nights', 'error')} required">
	<label for="num_nights">
		<g:message code="reservation.num_nights.label" default="Numnights" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="number" name="num_nights" required="" value="${fieldValue(bean: reservationInstance, field: 'num_nights')}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: reservationInstance, field: 'num_persons', 'error')} required">
	<label for="num_persons">
		<g:message code="reservation.num_persons.label" default="Numpersons" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="number" name="num_persons" required="" value="${fieldValue(bean: reservationInstance, field: 'num_persons')}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: reservationInstance, field: 'supple', 'error')} ">
	<label for="supple">
		<g:message code="reservation.supple.label" default="Supple" />
		
	</label>
	<g:checkBox name="supple" value="${reservationInstance?.supple}" />
</div>

<div class="fieldcontain ${hasErrors(bean: reservationInstance, field: 'total_price', 'error')} required">
	<label for="total_price">
		<g:message code="reservation.total_price.label" default="Totalprice" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="number" name="total_price" required="" value="${fieldValue(bean: reservationInstance, field: 'total_price')}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: reservationInstance, field: 'trans_in', 'error')} ">
	<label for="trans_in">
		<g:message code="reservation.trans_in.label" default="Transin" />
		
	</label>
	<g:checkBox name="trans_in" value="${reservationInstance?.trans_in}" />
</div>

<div class="fieldcontain ${hasErrors(bean: reservationInstance, field: 'trans_out', 'error')} ">
	<label for="trans_out">
		<g:message code="reservation.trans_out.label" default="Transout" />
		
	</label>
	<g:checkBox name="trans_out" value="${reservationInstance?.trans_out}" />
</div>

